import {
    fetch,
    post,
    put
} from '@/utils/request'
//  下面是获取数据的接口
export const login = {
    onSubmit: (paramObj) => {
        return post('/app/v1_0/authorizations', paramObj);
    }
} //登陆接口
export const mobile = {
    getSmsCode: (mobiles) => {
        return fetch(`/app/v1_0/sms/codes/${mobiles}`)
    }
} //登陆模块获取验证码接口

//获取登陆用户的个人信息
export const getuserInfo = {
    loadUserInfo: () => {
        return fetch('/app/v1_0/user')
    }
}

//获取用户频道列表
export const getuserChannel = {
    loaduserChanne: () => {
        return fetch('/app/v1_0/user/channels')
    }
}

export const getArticles = {
    loadArticles: (paramObj) => {
        return fetch('/app/v1_1/articles', paramObj)
    }
}